#include<stdio.h>
#include<time.h>
#pragma once


void read_file_into_array (int *array, int file_size, char *read_file)
{
	int i;
	FILE *read_file_ptr;

	read_file_ptr = fopen (read_file, "r");

	for (i = 0; i < file_size; i++)
		fscanf (read_file_ptr, "%d\n", &array[i]);

	fclose (read_file_ptr);
}



void write_array_to_file (int *array, int array_size, char *write_file)
{
	int i;
	FILE *write_file_ptr;

	write_file_ptr = fopen (write_file, "w");

	for (i = 0; i < array_size; i++)
		fprintf (write_file_ptr, "%d\n", array[i]);

	fclose (write_file_ptr);
}

